# Lesson Plan: Database Management III
## Course: Information Communication Technology
### Grade Level: Senior Secondary 3
### Duration: 80 minutes
### Objective:
By the end of this lesson, students will be able to:
1. Understand relational database concepts.
2. Create and manipulate tables using SQL.
3. Perform basic queries using SQL.
4. Understand primary keys, foreign keys, and relationships between tables.
### Materials Needed:
- Projector and computer for the teacher
- Computers for students with DBMS software (e.g., MySQL, SQLite)
- Whiteboard and markers
- Handouts on SQL syntax
### Lesson Outline:
#### Introduction (10 minutes)
1. **Greetings and attendance**
2. **Review of Previous Lesson:**
- Brief recap of key points from Database Management II: database definition, DBMS, basic operations (CRUD).
#### Direct Instruction (20 minutes)
1. **Introduction to Relational Databases:**
- Explain what a relational database is.
- Explain the concepts of tables, rows, and columns.
- Define primary keys and foreign keys.
2. **Table Creation:**
- Discuss the SQL `CREATE TABLE` statement.
- Show an example:
```sql
CREATE TABLE Students (
student_id INT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
birthdate DATE
);
```
3. **Inserting Data:**
- Explain the SQL `INSERT INTO` statement.
- Show an example:
```sql
INSERT INTO Students (student_id, first_name, last_name, birthdate)
VALUES (1, 'John', 'Doe', '2000-01-01');
```
4. **Querying Data:**
- Discuss the SQL `SELECT` statement.
- Show an example:
```sql
SELECT * FROM Students;
```
5. **Primary and Foreign Keys:**
- Explain the concept of relationships between tables.
- Show how to create a foreign key:
```sql
CREATE TABLE Enrollments (
enrollment_id INT PRIMARY KEY,
student_id INT,
course_id INT,
FOREIGN KEY (student_id) REFERENCES Students(student_id),
FOREIGN KEY (course_id) REFERENCES Courses(course_id)
);
```
#### Guided Practice (20 minutes)
1. **Hands-On Activity:**
- Students create a simple database with at least two related tables.
- Example scenario: A school database with `Students` and `Courses` tables.
2. **Tasks:**
- Create the `Students` and `Courses` tables.
- Insert sample data into each table.
- Write basic queries to retrieve data from the tables.
#### Independent Practice (20 minutes)
1. **Individual Tasks:**
- Students are given a worksheet with SQL tasks to complete independently.
- Tasks include creating tables, inserting data, and writing queries.
- Provide problems that require interpreting relationships between tables.
#### Review and Assessment (10 minutes)
1. **Review Key Points:**
- Summarize the key points of the lesson.
- Discuss any challenges faced during the activities.
2. **Q&A Session:**
- Encourage students to ask questions and clarify doubts.
#### Closure (5 minutes)
1. **Assign Homework:**
- Create a database schema for a library system with `Books` and `Authors` tables.
- Write SQL statements to create tables, insert sample data, and perform queries.
2. **Preview Next Lesson:**
- Introduction to advanced SQL queries and functions.
### Assessment:
- Monitor student participation during guided practice.
- Review student worksheet completion and accuracy.
- Homework assignment to assess understanding and application of concepts taught.
### Differentiation:
- Provide additional support and resources for students who need extra help.
- Offer advanced tasks for students who complete the basic tasks quickly and correctly.